{% extends 'base.html' %}
{% load bootstrap %}
{% block js %}
    <script type="text/javascript">
    $(document).ready(function () {
        $('#id_written_date').datetimepicker({
            showSecond: true,
            timeFormat: 'HH:mm:ss',
            dateFormat: 'yy-mm-dd',
            stepHour: 1,
            stepMinute: 1,
            stepSecond: 1
        });

        $('#id_post_date').datetimepicker({
            showSecond: true,
            timeFormat: 'HH:mm:ss',
            dateFormat: 'yy-mm-dd',
            stepHour: 1,
            stepMinute: 1,
            stepSecond: 1
        });

        $("#submit").click(function(){
            $("#alert-area").hide();
        });
    });
    </script>
{% endblock %}

{% block content %}
    <div id="alert-area">
        {{ message }}
    </div>
    <form action="" id="article_form" method="post">{% csrf_token %}
        {{ form|bootstrap }}
        <input id="submit" class="btn-primary" type="submit" value="Đăng bài" />
    </form>
{% endblock %}